home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disk User Volume 1 #6 / Commodore_Disk_User_Vol.1_6_1988_-.d64 / dec_hex convert (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  174b  |  8 lines

  1. 10 input"number in decimal";dec:ifdec>65535thenprint"too big":goto10
  2. 20 f=4096:fora=1to4
  3. 30 d%=dec/f:dec=dec-d%*f
  4. 40 d%=d%+48:ifd%>57thend%=d%+7
  5. 50 hx$=hx$+chr$(d%):f=f/16
  6. 60 next
  7. 70 print"$"hx$
  8.